import React, { Component } from 'react';

import './App.css'
import Search from './components/Search'
import List from './components/List'
class App extends Component {

  state = {
    userList:[],
    isFirst:true,
    isLoading:false,
    err:''
  }

  updateAppState = (data)=>{
    this.setState(data)
  }

  render() {
    const {userList} = this.state
    return (
      <div className="container">
        <Search updateAppState={this.updateAppState}/>
        <List {...this.state}/>
      </div>
    );
  }
}

export default App;